;; It is less than general to check for ~ here,
;; but it's the only way this runs fast enough.
(and (save-excursion (end-of-line)
- (eq (preceding-char) ?~))
+ (or
+ (eq (preceding-char) ?~)
+ ;; Handle executables in case of -F option.
+ ;; We need not worry about the other kinds
+ ;; of markings that -F makes, since they won't
+ ;; appear on real backup files.
+ (if (eq (preceding-char) ?*)
+ (progn
+ (forward-char -1)
+ (eq (preceding-char) ?~)))))
(not (looking-at dired-re-dir))
(let ((fn (dired-get-filename t t)))
(if fn (backup-file-name-p fn))))